package com.baseframe.mybatis.utils;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

public class PageUtil {


    public static<T> Page<T> buildPage(PageInfo pageInfo,Class<T> clazz){

        return new Page<T>(pageInfo.getCurrent(),pageInfo.getSize(),true);
    }


    public static <T> Page<T> selectCountPage(Page<T> page){

        return new Page<>(page.getCurrent(),page.getSize(),true);
    }

    public static <T> Page<T> buildPage(Long current,Long size,boolean searchCount){

        return new Page<>(current,size,searchCount);
    }

    public static <T> Page<T> buildPage(Long current,Long size){
        return new Page<>(current,size,true);
    }


}
